<ion-view view-title="设置交易密码">
    <ion-content class="content has-header ionic-pseudo">
        <div class="head-info padding">
            <div class="padding-left size-14">为保证交易安全，请设置交易密码。<br/>提示：此交易密码并非银行卡提现密码。</div>
        </div>
        <div class="tc" ng-show="istradepwd"> 
            <a class="assertive size-14">交易密码已设置</a><br>
            <button class="button button-full button-positive" ng-click="new_set_trade_pwd()">重新设置</button> 
        </div>
        <div class="list" ng-show="!istradepwd">
            <label class="item item-input">
                <span class="input-label">登录密码</span>
                <input class="number" type="password" ng-model='tpwd.loginPwd' placeholder="输入登录密码">
            </label>                  
            <div class="item-pwd">
                <span>交易密码</span>
                <div class="item-pwdinput" ng-click="openkeyboard()">
                    <a ng-if="tradePwd">
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                    </a>
                    <a ng-if="!tradePwd">设置交易密码(6位数字)</a>
                </div>
                <!-- <input type="password" ng-model='tpwd.tradePwd' placeholder="输入交易密码(6位数字)"> -->
            </div>
            <div class="item-pwd">
                <span>确认密码</span>
                <div class="item-pwdinput" ng-click="reopenkeyboard()">
                    <a ng-if="reTradePwd">
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                        <i class="icon size-21 positive icon-jiaqian"></i>&nbsp;
                    </a>
                    <a ng-if="!reTradePwd">确认交易密码(6位数字)</a>
                </div>
                <!-- <input type="password" ng-model='tpwd.reTradePwd' placeholder="重复输入交易密码"> -->
            </div>
            <button class="button button-full button-positive" ng-click="confirm_modify_trade()">确认提交</button>
        </div>
    </ion-content>
</ion-view>
<script id="settradepwd.html" type="text/ng-template">
<div class="tc pr size-14" >{{settitle}}
<span class="closetwd fr" ng-click="canceltwd()"><i class="icon size-18 ion-close-round"></i></span>
</div>
<div class="tc pr size-14">
<br>
</div>
<div class="passContainer tc" ng-click="shownumberkeyboard()">
    <div class="passItem"><i class="icon size-24 positive icon-jiaqian" ng-if="pwdlenght>=1"></i></div>
    <div class="passItem"><i class="icon size-24 positive icon-jiaqian" ng-if="pwdlenght>=2"></i></div>
    <div class="passItem"><i class="icon size-24 positive icon-jiaqian" ng-if="pwdlenght>=3"></i></div>
    <div class="passItem"><i class="icon size-24 positive icon-jiaqian" ng-if="pwdlenght>=4"></i></div>
    <div class="passItem"><i class="icon size-24 positive icon-jiaqian" ng-if="pwdlenght>=5"></i></div>
    <div class="passItem"><i class="icon size-24 positive icon-jiaqian" ng-if="pwdlenght>=6"></i></div>
</div>
<div class="tc">
<button class="button button-full button-positive" ng-disabled="pwdlenght!=6" ng-click="settradepwd('{{pwdtype}}')">确定</button>
</div>
</script>